<!DOCTYPE html>
<html lang="en">
<head>
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width,height=device-height">
  <meta charset="UTF-8">
  <meta name="Author" content="haley">
  <meta name="Keywords" content="倒计时">
  <meta name="Description" content="倒计时">
  <script crossorigin="anonymous" integrity="sha384-6ePHh72Rl3hKio4HiJ841psfsRJveeS+aLoaEf3BWfS+gTF0XdAqku2ka8VddikM" src="https://lib.baomitu.com/jquery/1.11.3/jquery.min.js"></script>
  <link crossorigin="anonymous" integrity="sha384-pdapHxIh7EYuwy6K7iE41uXVxGCXY0sAjBzaElYGJUrzwodck3Lx6IE2lA0rFREo" href="https://lib.baomitu.com/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
  <link href="../../../css/page.css" rel="stylesheet">
  <script crossorigin="anonymous" integrity="sha384-pPttEvTHTuUJ9L2kCoMnNqCRcaMPMVMsWVO+RLaaaYDmfSP5//dP6eKRusbPcqhZ" src="https://lib.baomitu.com/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
  <script crossorigin="anonymous" integrity="sha384-8t+aLluUVnn5SPPG/NbeZCH6TWIvaXIm/gDbutRvtEeElzxxWaZN+G/ZIEdI/f+y" src="https://lib.baomitu.com/vue/2.6.10/vue.min.js"></script>
  <script src="../../../js/page.js"></script>
  <script src="../../../js/changeTitle.js"></script>
  <link href="../../../imgs/favicon.ico" rel="shortcut icon">
  <script src="../../../js/goToHome.js"></script>
  <title></title>
  <style>
    .countdown2{
      background:url(countdown/img/floatCountdown.png) no-repeat center center;
      background-size:100% 100%;
      width:188px;
      height:446px;
      position: fixed;
      right: 20px;
      top: 40%;
      z-index: 999999999;
    }
    .countdown2__countdown{
      text-align: center;
      position: relative;
      top: 130px;
      color: #fff;
      font-size: 26px;
    }
    .countdown2__countdown span:not(.countdown2__countdown span:last-child){
      margin-right:20px;
    }
    .countdown2__btns{
      position: relative;
      top: 163px;
      padding:0;
    }
    .countdown2__btns li{list-style: none;padding:0;margin:0;}
    .countdown2__btns li a{
      display: block;
      text-align: center;
      padding: 10px 0;
      margin: 12px;
    }
    .countdown2__btns li p{
      color: #fff;
      margin-top: 10px;
    }
  </style>
  <script>
    var data={
      title:'倒计时',
      content:{
        intro:{
          list:[
            {
              title:'使用说明：',
              className:'bs-callout-info',
              list:[
                {title:'基础配置：',content:'原生js即可'}
                ,{title:'如何使用：',content:'直接复制本文件html、css、js'}
              ]
            }
          ]
        }
      }
    };
  </script>
</head>
<body>
<div id="page">
  <div class="container">
    <h3 class="text-center">{{title}}</h3>
    <div class="bs-callout" :class="item.className" v-for="item in content.intro.list">
      <h4>{{item.title}}</h4>
      <ul>
        <li v-for="item2 in item.list"><b>{{item2.title}}</b>{{item2.content}}</li>
      </ul>
    </div>
  </div>
  <script>
    var page = new Vue({
      el: '#page',
      data: data
    });
  </script>
</div>

<div class="container">
  <section class="panel panel-info">
    <div class="panel-heading">倒计时</div>
    <div class="panel-body">
      <!--核心代码 s-->
      <div class="row">
        <div class="col-sm-12">
          <div class="">
            <p>
<pre>
&lt;div class="countdown2">
  &lt;div class="countdown2__countdown">
    &lt;p>
      &lt;span id="day">360&lt;/span>
      &lt;span id="hours">56&lt;/span>
      &lt;span id="minutes">59&lt;/span>
      &lt;span id="seconds">05&lt;/span>
    &lt;/p>
  &lt;/div>
  &lt;ul class="countdown2__btns">
    &lt;li>
      &lt;a href="#">
        &lt;img src="countdown/img/xin.png">
        &lt;p>我要参展&lt;/p>
      &lt;/a>
    &lt;/li>
    &lt;li>
      &lt;a href="#">
        &lt;img src="countdown/img/jinru.png">
        &lt;p>我要参观&lt;/p>
      &lt;/a>
    &lt;/li>
  &lt;/ul>
&lt;/div>

&lt;style>
  .countdown2{
    background:url(countdown/img/floatCountdown.png) no-repeat center center;
    background-size:100% 100%;
    width:188px;
    height:446px;
    position: fixed;
    right: 20px;
    top: 40%;
    z-index: 999999999;
  }
  .countdown2__countdown{
    text-align: center;
    position: relative;
    top: 130px;
    color: #fff;
    font-size: 26px;
  }
  .countdown2__countdown span:not(.countdown2__countdown span:last-child){
    margin-right:20px;
  }
  .countdown2__btns{
    position: relative;
    top: 163px;
  }

  .countdown2__btns li a{
    display: block;
    text-align: center;
    padding: 10px 0;
    margin: 12px;
  }
  .countdown2__btns li p{
    color: #fff;
    margin-top: 10px;
  }
&lt;/style>

&lt;script>
  var countDownTime={init:function(a,b,c,d,e){this.t=a,this.d=b,this.h=c,this.m=d,this.s=e},start:function(){var a=this;setInterval(a.timer,1e3)},timer:function(a){var b,c,d,e,f,g,h;a=this.countDownTime,b=new Date,c=new Date(a.t),d=c.getTime()-b.getTime(),e=Math.floor(a.formatTime(d,"day")),f=Math.floor(a.formatTime(d,"hours")),g=Math.floor(a.formatTime(d,"minutes")),h=Math.floor(a.formatTime(d,"seconds")),a.d&&(a.d.innerText=a.formatNumber(e)),a.h&&(a.h.innerText=a.formatNumber(f)),a.m&&(a.m.innerText=a.formatNumber(g)),a.s&&(a.s.innerText=a.formatNumber(h))},formatNumber:function(a){if(a&lt;=0){a=0}
    return a=a.toString(),a[1]?a:"0"+a},formatTime:function(a,b){switch(b){case "day":return a/1e3/60/60/24;case "hours":return a/1e3/60/60%24;case "minutes":return a/1e3/60%60;case "seconds":return a/1e3%60}}};
  $(function(){
    var day = document.getElementById('day');
    var hours = document.getElementById('hours');
    var minutes = document.getElementById('minutes');
    var seconds = document.getElementById('seconds');
    // 日 时 分 秒的dom对象
    countDownTime.init('2020/6/1 09:00:00', day, hours, minutes, seconds);
    countDownTime.start();
  });
&lt;/script>
</pre>

            </p>
            <div class="countdown2">
              <div class="countdown2__countdown">
                <p>
                  <span id="day">360</span>
                  <span id="hours">56</span>
                  <span id="minutes">59</span>
                  <span id="seconds">05</span>
                </p>
              </div>
              <ul class="countdown2__btns">
                <li>
                  <a href="#">
                    <img src="countdown/img/xin.png">
                    <p>我要参展</p>
                  </a>
                </li>
                <li>
                  <a href="#">
                    <img src="countdown/img/jinru.png">
                    <p>我要参观</p>
                  </a>
                </li>
              </ul>
            </div>
          </div>
          <!--核心js-->
          <script>
            var countDownTime={init:function(a,b,c,d,e){this.t=a,this.d=b,this.h=c,this.m=d,this.s=e},start:function(){var a=this;setInterval(a.timer,1e3)},timer:function(a){var b,c,d,e,f,g,h;a=this.countDownTime,b=new Date,c=new Date(a.t),d=c.getTime()-b.getTime(),e=Math.floor(a.formatTime(d,"day")),f=Math.floor(a.formatTime(d,"hours")),g=Math.floor(a.formatTime(d,"minutes")),h=Math.floor(a.formatTime(d,"seconds")),a.d&&(a.d.innerText=a.formatNumber(e)),a.h&&(a.h.innerText=a.formatNumber(f)),a.m&&(a.m.innerText=a.formatNumber(g)),a.s&&(a.s.innerText=a.formatNumber(h))},formatNumber:function(a){if(a<=0){a=0}
              return a=a.toString(),a[1]?a:"0"+a},formatTime:function(a,b){switch(b){case "day":return a/1e3/60/60/24;case "hours":return a/1e3/60/60%24;case "minutes":return a/1e3/60%60;case "seconds":return a/1e3%60}}};
            $(function(){
              var day = document.getElementById('day');
              var hours = document.getElementById('hours');
              var minutes = document.getElementById('minutes');
              var seconds = document.getElementById('seconds');
              // 日 时 分 秒的dom对象
              countDownTime.init('2020/6/1 09:00:00', day, hours, minutes, seconds);
              countDownTime.start();
            });
          </script>
          <!--核心js-->
        </div>
      </div>
      <!--核心代码 e-->
    </div>
  </section>
</div>

</body>

</html>
